package com.xzlf.task;

import com.xzlf.domain.JobTask;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
@Slf4j
public class TestScheduleFromDB {

//    @Autowired
//    private Map<String, JobTask> jobTaskMap;


//    @Scheduled(cron = "#{jobTaskMap.get(\"PrintTask\").getJobCron()}")
    @Scheduled(cron = "#{TaskUtil.utilMap.get(\"PrintTask\").getJobCron()}")
    public void getParam(){
        log.info("执行打印任务");

    }
}
